package sap.gui;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;



/*
 * GantTable.java
 *
 * Created on 10 de noviembre de 2007, 11:01 AM
 */

/**
 *
 * @author Enrique Garcia
 */
public class GantTable extends javax.swing.JPanel {
    
    /** Creates new form GantTable */
    public GantTable(CManager cm) {
        this.cm=cm;
        initComponents();
        }


    public void init(String project)
    {
        sap.gui.chart.GanttDiagramm.paintGantt(project);
        //CHART/**/
        jLabel1 = new JLabel(new ImageIcon(getClass().getResource("chart/chart.jpg")));
        jLabel1.setSize(800,300);
        jLabel1.setVisible(true);
        jLabel1.repaint();
        jPanel2.setLayout(null);
        jPanel2.add(jLabel1);

        jLabel1.setLocation(0,0);
        jPanel2.setVisible(true);
        jPanel2.setEnabled(true);
        jPanel2.repaint();
    }
    
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel2 = new javax.swing.JLabel();
        jProgressBar1 = new javax.swing.JProgressBar();
        jPanel2 = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();

        setBackground(new java.awt.Color(0, 0, 0));
        setLayout(null);

        jLabel2.setForeground(new java.awt.Color(255, 255, 255));
        jLabel2.setText("Status");
        add(jLabel2);
        jLabel2.setBounds(10, 460, 330, 14);
        add(jProgressBar1);
        jProgressBar1.setBounds(380, 460, 400, 20);

        jPanel2.setMinimumSize(new java.awt.Dimension(800, 300));
        jPanel2.setLayout(null);

        jPanel3.setBackground(new java.awt.Color(0, 0, 0));
        jPanel3.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                jPanel3MouseReleased(evt);
            }
        });
        jPanel2.add(jPanel3);
        jPanel3.setBounds(400, 78, 5, 185);

        add(jPanel2);
        jPanel2.setBounds(10, 10, 800, 300);
    }// </editor-fold>//GEN-END:initComponents

    private void jPanel3MouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jPanel3MouseReleased
        // TODO add your handling code here:
        int x1 = jPanel3.getX();
        int x = evt.getX() + x1;
        jPanel3.setLocation(x, jPanel3.getY());
    }//GEN-LAST:event_jPanel3MouseReleased


    // Variables declaration - do not modify
    private javax.swing.JLabel jLabel1;
    private javax.swing.JPanel jPanel1;
    // End of variables declaration
 
    
    private CManager cm;  
    
    protected static final String QOWNER="QOWNER";
    // Variables declaration - do not modify//GEN-BEGIN:variables
    protected javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    protected javax.swing.JProgressBar jProgressBar1;
    // End of variables declaration//GEN-END:variables
    
}
